﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Yunchang.ILUI
{
    /// <summary>
    /// UI 逻辑类，T是关联的View.
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class UIPageRelateView<T> :UIPage where T :UIViewBase
    {
        protected T view = null;
        protected override void OnInit()
        {
            view = Activator.CreateInstance<T>();
            view.InjectMono(uiMono);//注入UI实例 、初始化注入

            base.OnInit();
        }

    }

    public class UIItemRelateView<T> : UIItem where T : UIViewBase
    {
        protected T view = null;
        protected override void OnInit()
        {
            view = Activator.CreateInstance<T>();
            view.InjectMono(uiMono);
            base.OnInit();
        }
    }
}